<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- 
    JSP Name : regglist.jsp
    Description : 시도 => 시군구 => 읍면동 리스트 조회.
    author ETLee
    since 2012. 6. 19.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 6. 19.     ETLee     최초 생성
--%>
<%@ include file="/WEB-INF/jsp/com/include/declare.jspf" %>
    <c:choose>
        <c:when test="${testDriveSearchVO.sAddr == ''}">
            <c:choose>
                <c:when test="${testDriveSearchVO.areaType == '2'}">
                    <select class="select1 select-type1" name="osbcrAddr2" id="osbcrAddr2" style="width:153px;" onchange="javascript:fnSelectIndex('', '3', $('#osbcrAddr1 option:selected').val(), this.value);">
                        <option value="">시/군/구 선택</option><!--  class="select select-type1" -->
                    <c:forEach var="admz" items="${reggList}" varStatus="status">
                        <option value="${admz.admzId}">${admz.admzNm}</option>
                    </c:forEach>
                    </select>
                    <script>
                    $('#osbcrAddr2').customSelect();
                    </script>
                </c:when>
                <c:when test="${testDriveSearchVO.areaType == '3'}">
                    <select class="select1 select-type1" name="osbcrAddr3" id="osbcrAddr3" style="width:153px;">
                        <option value="">동/읍/면 선택</option><!--  class="select select-type1" -->
                    <c:forEach var="umd" items="${reggList}" varStatus="status">
                        <option value="${umd.umdId}">${umd.umdNm}</option>
                    </c:forEach>
                    </select>
                    <script>
                    $('#osbcrAddr3').customSelect();
                    </script>
                </c:when>
                <c:otherwise>
                </c:otherwise>
            </c:choose>
        </c:when>
        <c:when test="${testDriveSearchVO.sAddr == 'N'}">
            <c:choose>
                <c:when test="${testDriveSearchVO.areaType == '2'}">
                    <select class="select1 select-type1" name="nsbcrAddr2" id="nsbcrAddr2" style="width:153px;" onchange="javascript:fnSelectIndex('N', '3', $('#nsbcrAddr1 option:selected').val(), this.value);">
                        <option value="">시/군/구 선택</option><!--  class="select select-type1" -->
                    <c:forEach var="admz" items="${reggList}" varStatus="status">
                        <option value="${admz.admzId}">${admz.admzNm}</option>
                    </c:forEach>
                    </select>
                    <script>
                    $('#nsbcrAddr2').customSelect();
                    </script>
                </c:when>
                <c:when test="${testDriveSearchVO.areaType == '3'}">
                    <select class="select1 select-type1" name="nsbcrAddr3" id="nsbcrAddr3" style="width:153px;" onchange="javascript:fnSelectIndex('N', '4', $('#nsbcrAddr1 option:selected').val(), $('#nsbcrAddr2 option:selected').val(), $('#nsbcrAddr3 option:selected').text())";>
                        <option value="">동/읍/면 선택</option>
                    <c:forEach var="umd" items="${reggList}" varStatus="status">
                        <option value="${umd.umdId}">${umd.umdShortNm}</option>
                    </c:forEach>
                    </select>
                    <script>
                    $('#nsbcrAddr3').customSelect();
                    </script>
                </c:when>
                <c:when test="${testDriveSearchVO.areaType == '4'}">
                    <select class="select1 select-type1" name="nsbcrAddr4" id="nsbcrAddr4" style="width:153px;">
                        <option value="">도로명 선택</option><!--  class="select select-type1" -->
                    <c:forEach var="rwd" items="${reggList}" varStatus="status">
                        <option value="${rwd.rdwNmCd}">${rwd.rdwNm}</option>
                    </c:forEach>
                    </select>
                    <script>
                    $('#nsbcrAddr4').customSelect();
                    </script>
                </c:when>
                <c:otherwise>
                </c:otherwise>
            </c:choose>
        </c:when>
        <c:otherwise>
        </c:otherwise>
    </c:choose>